//
//  UIView+BorderLine.h
//  Btpin
//
//  Created by Vic on 2019/3/10.
//  Copyright © 2019 Vic. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef NS_OPTIONS(NSUInteger, BorderSideType) {
    BorderSideTypeAll         =        0,
    BorderSideTypeTop         =   1 << 1,
    BorderSideTypeBottom      =   1 << 2,
    BorderSideTypeLeft        =   1 << 3,
    BorderSideTypeRight       =   1 << 4,
};

typedef NS_OPTIONS(NSUInteger, ShadowPathSide) {
    ShadowPathSideAll           =        0,
    ShadowPathSideTop           =   1 << 1,
    ShadowPathSideBottom        =   1 << 2,
    ShadowPathSideLeft          =   1 << 3,
    ShadowPathSideRight         =   1 << 4,
    ShadowPathSideNoTop         =   1 << 5
};



@interface UIView (BorderLine)

- (UIView *)borderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth borderType:(BorderSideType)borderType;



/**
 设置阴影

 @param shadowColor 阴影颜色
 @param shadowOpacity 阴影的不透明度
 @param shadowRadius 阴影半径
 @param shadowOffset 阴影的偏移量设置
 */
//- (void)setShadowShadowColor:(UIColor *)shadowColor shadowOpacity:(CGFloat)shadowOpacity shadowRadius:(CGFloat)shadowRadius side:(ShadowPathSide)shadowPathSide shadowOffset:(CGSize)shadowOffset;
- (void)setShadowShadowColor:(UIColor *)shadowColor shadowOpacity:(CGFloat)shadowOpacity shadowRadius:(CGFloat)shadowRadius shadowOffset:(CGSize)shadowOffset;


/// 设置圆角和阴影
/// @param viewFrame view的frame
/// @param cornerRadius 圆角半径
/// @param backgroundColor view背景色
/// @param shadowColor 阴影颜色
/// @param shadowOffset 阴影偏移
/// @param shadowOpacity 阴影透明度
/// @param shadowRadius 阴影半径
+ (CALayer *)setCornerAndshadowForViewFrame:(CGRect)viewFrame cornerRadius:(CGFloat)cornerRadius backgroundColor:(UIColor *)backgroundColor shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)shadowOffset shadowOpacity:(CGFloat)shadowOpacity shadowRadius:(CGFloat)shadowRadius;

@end
